home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 1999 August / Disc 1 / APC481.ISO / workshop / c / cat.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1999-06-04  |  751 b   |  25 lines

  1. // **************************************************************
  2. // cat.cpp
  3. // Example program for Simple C++
  4. //
  5. // (c) 1999 Emmenjay Consulting Pty Ltd                          
  6. //                                                               
  7. // History                                                       
  8. // 04/06/99 MJS  Initial Coding.                                 
  9. //                                                               
  10. // **************************************************************
  11.  
  12. #include <iostream>
  13.  
  14. int main( void )
  15. {
  16.   const int BUFFSIZE = 256;
  17.   char  buffer[BUFFSIZE];
  18.  
  19.   while (!std::cin.eof()) {
  20.     std::cin.getline( buffer, BUFFSIZE );
  21.     std::cout << buffer << '\n';
  22.   }
  23.   return 0;
  24. }
  25.